package SFT;

	import java.util.HashSet;
	import java.util.Iterator;
	import java.util.Set;

	/**basically is just a wrapper for an object of type "set", which represents a subSet of Zn*/
	public class subSet implements java.lang.Iterable<Integer> {

	        private Set<Integer> set;

	        /*trivial constructor*/
	        public subSet() {
	                this.set=new HashSet<Integer>();
	        }
	        
	        /*returns an iterator over the subSet*/
	        public Iterator<Integer> iterator(){
	                return set.iterator();
	        }
	        
	        /*adds i to the subSet*/
	        public void add_n_keep(int i){
	        	set.add(i);
	        }

	        
	        /*prints the subSet*/
	        public void print() {
	                for (Integer num : set){
	                        System.out.print(num+ " ");
	                }
	                
	        }

	        /*returns the size of the subSet*/
	        public double size() {
	                return set.size();
	        }

	        /*returns an arbitrary member of the subSet*/
			public double first() {
				return this.set.iterator().next();
			}

	}